package com.mijie.tag;

import java.io.IOException;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;

import com.mijie.core.ApplicationProperties;

public class PropTag extends SimpleTagSupport{

	private String name;
	
	public void doTag() throws JspException, IOException {
		JspWriter out = getJspContext().getOut();
		String value = ApplicationProperties.get(name);
		if(value!=null) out.write(value);
	}

	public void setName(String name) {
		this.name = name;
	}
}
